module dcore;

import std.stdio;
import std.conv;

import reflection;

class Entity
{
	ulong id;
}

struct property(T)
{
	import std.signals;
	mixin Signal!(T) valueChanged;
	private T content;
	
	@property T value()
	{
		return content;
	}
	
	@property void value(T arg)
	{
		if (content != arg) {
			content = arg;
			valueChanged.emit(content);
			}
	}
}



int main()
{
	class MyEntity : public Entity
	{
		property!int zahl;
		property!float zahl2;
	}
	
	MyEntity A = new MyEntity();
	A.zahl.value = 10;
	A.zahl2.value = 12.5;
	string[] fields = fieldsOf!MyEntity;
	foreach (string field;  fields) {
		writefln(field);
	}
	
	return 0;
}